<?php
require('includes/top.php');
if($_POST['id'])
{
echo '<div style="text-align:left;">';
echo '<ul type="square">';
$question=$_POST['id'];
$qu=mysql_query("select * from faq where faq like '%$question%'");
while($row=mysql_fetch_array($qu))
{
	echo '<li><b>'.$row['faq'].'</b>';
$faq_id=$row['faq_id'];
	$ans=mysql_query("select * from answers where faq_id=".$faq_id);
	echo '<ul>';
	$i="1";
	while($res=mysql_fetch_array($ans))
	{
		echo '<li>Ans&nbsp;'.$i.'&nbsp; - '.$res['answers'].'</li>';
		$i++;
	}
	echo '</ul></li>';
}
echo '</ul>';
}

?>